export function debounce(delay, fn) {
	let timer = null
	return function(...args) {
		timer != null && clearTimeout(timer)
		timer = setTimeout(() => {
			fn(...args)
			timer = null
		}, delay)
	}
}